@if (_visible)
{
    <div class="grid" style="width: 100%; height: 100%; background-color: @BackgroundColor; @GenerateStyle()"></div>
}
else
{
    <div class="grid"></div>
}